﻿using Basic.FormDAL;
using Basic.FormModel.DataSource;
using Basic.FormRemoteModel;

namespace Basic.FormCollect.lmpl
{
    internal class FormDataSourceCollect : IFormDataSourceCollect
    {
        private readonly IFormDataSourceDAL _BasicDAL;

        public FormDataSourceCollect ( IFormDataSourceDAL basicDAL )
        {
            this._BasicDAL = basicDAL;
        }

        public FormDataSource[] GetItems ( FormTableType tableType )
        {
            return this._BasicDAL.Gets<FormDataSource>(a => a.TableType == tableType && a.IsEnable);
        }
    }
}
